﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMS20.Help
{
    using EMS20.BusinessLogicLayer;
    using EMS20.Common;
    using EMS20.Entity;

    public abstract class WebBaseHandler : AjaxHelp
    {

        public override void SubProcessRequest()
        {
            //判断是否存在Session
            if (Session[Kits.Entity] == null)
            {
                if (Request.Cookies[Kits.CookieId] == null)
                {
                    base.WriteFail("您还没有登陆，请重新登陆");
                }
                else
                {
                    string cookieId = Request.Cookies[Kits.CookieId].Value.ToString();
                    UserInfoEntity entity = UserInfo_BLLSub.Get_UserInfoEntity(int.Parse(cookieId));
                    Session[Kits.Entity] = entity;
                }


            }
            SubSubProcessRequest();
        }
        public abstract void SubSubProcessRequest();
    }
}
